package com.aaa.snsservice.service;

import com.aaa.common.entity.Order;
import com.aaa.snsservice.config.MyRule;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author: YuXin
 * @Date : Created in 2020/11/4 16:58
 * @ClassName : OrderService
 * @Description : 调用order订单列表
 * @Package_Name : com.aaa.snsservice.service
 */
@FeignClient(name = "orderService", configuration = MyRule.class)   //name对应注册名称  也就是要调用的服务注册到注册中心的服务名称一致
public interface OrderService {
    /**
     * 订单列表  远程调用
     */
    @RequestMapping("/order/selectAll")
    //注解的restful风格以及括号内容 对应远程调用order的controller的注解和路径一致
    List<Order> selectAllOrder();
}
